/*
 * Copyright (C) 2017-2021
 * All rights reserved, Designed By
 * Copyright authorization contact 18814114118
 */
package com.shop.cereshop.agent.service.notice;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shop.cereshop.agent.page.notice.CereNoticeAgentVO;
import com.shop.cereshop.agent.page.user.CereAgentUserVO;
import com.shop.cereshop.commons.domain.common.Page;
import com.shop.cereshop.commons.domain.notice.CereNotice;
import com.shop.cereshop.commons.exception.CoBusinessException;

import java.util.List;

public interface CereNoticeService extends IService<CereNotice> {

  void insert(CereNotice cereNotice) throws CoBusinessException;

  CereNotice getById(Long noticeId);

  Page<CereNoticeAgentVO> getAll(Integer page, Integer pageSize, Long agentUserId, Integer noticeType, Integer receive);

  CereNotice getIndexNotice(Integer receive, CereAgentUserVO user);

  /**
   * 根据消息ID和代理商用户ID查询消息详情与ifRead状态
   */
  CereNoticeAgentVO getByIdForAgent(Long noticeId, Long agentUserId);

  /**
   * 查询首页通知（与ifRead状态）
   */
  CereNoticeAgentVO getIndexNoticeForAgent(Integer receive, CereAgentUserVO user);
}
